package com.zzhua.controller;

import com.zzhua.entity.Student;
import com.zzhua.feign.FeignProviderClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collection;

@RequestMapping("feign")
@RestController
public class FeignController {

    @Autowired
    private FeignProviderClient feignProviderClient;

    @RequestMapping("findAll")
    public Collection<Student> findAll() {
        return feignProviderClient.findAll();
    }

    @RequestMapping("port")
    public String port(){
        return feignProviderClient.port();
    }

}
